lcd method comparing fractions